<extend name="./Application/Common/View/block/base.php" />
<block name="header">
    <include file="./Application/Admin/View/block/easyui_header.php" />
    <include file="./Application/Admin/View/block/amap_header.php" />
    <style>

    </style>
</block>
<block name="bdoy">
    <body>
        <div class="easyui-tabs" fit="true">
            <div title="打卡地点" style="padding:10px;" >
                <div id="container" class="easyui-panel" data-options="fit:true,border:false" style="width:900px;height:400px;position: relative;"></div>
            </div>
            <div title="打卡照片" style="padding:10px;" fit="true">
                <img src="{$record['photo']}" width="320" height="480"/>
            </div>
        </div>
    </body>
</block>
<block name="footExtendJs">
<script>
    var gps = [{$gps}];
    var info = '姓名：{$person['realname']}<br>电话：{$person['phone']}<br>执勤设施：{$record['signposition']}<br>打卡时间：{$record['createtime']}';
    var map = new AMap.Map('container', {
        resizeEnable: true,
        zoom:15,
        center: gps
    });
    $(function(){
        map.plugin(["AMap.ToolBar"], function() {
            map.addControl(new AMap.ToolBar());
        });
        map.plugin(["AMap.MapType"],function(){
            var mapType= new AMap.MapType({showRoad:true});
            map.addControl(mapType);
        });
        var marker = new AMap.Marker({
            position: gps,
            draggable: true,
            cursor: 'move'
        });
        marker.setMap(map);
        // 设置点标记的动画效果，此处为弹跳效果
        marker.setAnimation('AMAP_ANIMATION_BOUNCE');
        var infoWindow = new AMap.InfoWindow({
            content: info,
            offset: new AMap.Pixel(0, -50)
        });
        infoWindow.open(map, gps);
    });


</script>


</block>
